/**
 * Description
 *
 * Creation Date 27/12/2017
 * @author Candy
 */
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import Swiper from 'react-id-swiper';
import 'react-id-swiper/src/styles/css/swiper.css';
export default class SwipeComponent extends Component {
	render() {
		const params = {
			pagination: {
				el: '.swiper-pagination',
				type: 'bullets',
				clickable: true
			},
			// navigation: {
			// 	nextEl: '.swiper-button-next',
			// 	prevEl: '.swiper-button-prev'
			// },
			spaceBetween: 30
		}

		return(
			<Swiper {...params}>
				{
					this.props.dataList[0].banner_url && this.props.dataList.map((item, index) => (
						<Link to={item.banner_link} key={index}>
							<img src={item.banner_url} alt=""/>
						</Link>
					))
				}
			</Swiper>
		)
	}
}